<template>
    <div>
        <h2>这是MySon组件</h2>
        <h4>姓名:{{uname}}</h4>
		<h4>年龄:{{uage}}</h4>
        <h4>{{hobby}}</h4>
        <button @click="biu">emit传递数据</button>
		<button @click="fashe">.sycn传递数据</button>
    </div>
</template>
<script>
    export default {
        //通过props定义属性
        props: {
            uname:String,
            uage:Number,
            hobby:String
        },
        methods:{
            biu(){
                this.$emit("hobby","$emit发送过来的")
            },
            fashe(){
				this.$emit("update:hobby","我是来自.sycn修改的值")
            }
        }
    }
</script>
<style>
</style>